import matplotlib.pyplot as plt
from pylab import *

mpl.rcParams['font.sans-serif'] = ['SimHei']

# # 嵌入尺寸图
x = [8, 16, 32, 64, 128, 256]
x = [f'{i}维' for i in x]
yy = [[0.9037983069827061, 0.9057966578931261, 0.9113164271646101, 0.9226152112310922, 0.9251680595112501,
       0.9181792322731873],
      [0.8772370486656201, 0.9149764521193091, 0.9189711387513585, 0.9291969568892645, 0.9419876826470233,
       0.9338171718391498],
      [0.8817282762221583, 0.9107759228094983, 0.9188146654947933, 0.9190827050398155, 0.9301419453938539,
       0.9078514662806763],
      [0.8970014077761279, 0.909650497954473, 0.9253041036274401, 0.9239802707843209, 0.9335488967817379,
       0.9108458721343908]]
color = ['red', 'blue', 'lime', 'yellow']
dataset = ['Cora', 'CiteSeer', 'PubMed', 'Reddit-s']
for y, c, d in zip(yy, color, dataset):
    plt.plot(x, y, label=d, color=c, linewidth=2)
plt.xlabel("嵌入尺寸")
plt.ylabel("ROC")
plt.title("嵌入尺寸与ROC")
plt.legend()
plt.savefig(fname='test.svg', format='svg')
plt.show()
